import { FILTER_ACTIVE } from '../constants'

const initState = {
  active: 'All',
  arr: ['All', 'Active', 'Completed'],
}
export default function filter(state = initState, action) {
  switch (action.type) {
    case FILTER_ACTIVE:
      return {
        ...state,
        active: action.active,
      }
    default:
      return state
  }
}
